package com.lambert.ginkgo.config;

import com.lambert.ginkgo.properties.WebClientProperties;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import static com.lambert.ginkgo.config.OpenAIProperties.PREFIX;

/**
 * OpenAI API 配置属性
 */
@Component
@ConfigurationProperties(prefix = PREFIX)
@Data
public class OpenAIProperties {

    public static final String PREFIX = "ginkgo.openai";
    /**
     * OpenAI API 密钥（必填）
     */
    private String apiKey;

    /**
     * API 基础地址，默认：https://api.openai.com/v1
     */
    private String baseUrl = "https://api.openai.com/v1";

    /**
     * 默认使用的模型，如：gpt-3.5-turbo
     */
    private String defaultModel = "gpt-3.5-turbo";

    /**
     * 超时时间（毫秒）
     */
    private int timeout = 30000;
    /**
     * WebClient 配置
     */
    private WebClientProperties webClientProperties;

}
